<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active{
            border: 2px solid greenyellow;
            border-radius: 2px;
        }
    </style>
</head>

<body>
    <div id="app">
        <img :src="imgSrc" :title="title" :class={active:isActive} @click="change">
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:'#app',
            data:{
                imgSrc:'./image/01.jpg',
                title:'这是我的gitee',
                isActive:false,
            },
            methods:{
                change(){
                    this.isActive = !this.isActive
                }
            }
        })
    </script>
</body>
</html>